#!/usr/bin/python
# -*- coding: utf-8 -*-

import sys
import cx_Oracle as oracle

def myprint(obj, end='\n'):
    sys.stdout.write(str(obj) + end)

def main():
    conn=oracle.connect('scott','scott11','windb')
    cursor=conn.cursor()
    sql='select * from dept'
    cursor.execute(sql)
    result=cursor.fetchall()
    for row in result:
        myprint(row)

if __name__ == '__main__':
    main()
    myprint('done')